/* ====================================================================
 * (#)Header: RuleData.java
 * (#)Revision: 
 * (#)Date Created: Sep 30, 2011 12:47:15 AM
 * (#)Created By: Karol Wozniak
 * ====================================================================
 *
 * Copyright (c) 2007 karolak .  All rights reserved.
 *
 * ====================================================================
 * 
 * The software application represented here is the sole property of 
 * karolak. Its unauthorized utilization is expressly prohibited.
 * 
 * ====================================================================
 */
package com.karolak.rules.service;

import java.util.Arrays;
import java.util.List;

/**
 * <code>RuleData</code> is used to ....
 * 
 * @author <a href="mailto:kwozniak@hotmail.com">Karol Wozniak</a>
 */
public class RuleData {

	private String taskType;
	private String eventType;
	private int bdPassed;

	private List<String> roles;
	private String color;

	public RuleData(String taskType, String eventType, int bdPassed) {
		this.taskType = taskType;
		this.eventType = eventType;
		this.bdPassed = bdPassed;
	}

	public static RuleData create(String taskType, String eventType, int bdPassed) {
		return new RuleData(taskType, eventType, bdPassed);
	}

	public static void main(String[] args) {
		String str = "FTS,LTS,VC";

		System.out.println(Arrays.asList(str.split(",")));

		str = "FTS,LTS,VC";

		System.out.println(Arrays.asList(str.split(",")));
	}

	public String getTaskType() {
		return taskType;
	}

	public void setTaskType(String taskType) {
		this.taskType = taskType;
	}

	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	public int getBdPassed() {
		return bdPassed;
	}

	public void setBdPassed(int bdPassed) {
		this.bdPassed = bdPassed;
	}

	@Override
	public String toString() {
		return String.format("RuleData(taskType: %s, eventType: %s, bdPassed: %s, color: %s, roles: %s)", getTaskType(), getEventType(), getBdPassed(), getColor(), getRoles());
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public List<String> getRoles() {
		return roles;
	}

	public void setRoles(List<String> roles) {
		this.roles = roles;
	}

}
